#!/bin/sh -e

# Quick script to pull the last 10 entries from QGC's datalog file
# takes the full path to the datalog file as an argument, defaults
# to use the local directory.

if [ -n "$1" ]; then
  DIRECTORY=$1
else
  DIRECTORY=$PWD
fi

while :
do
  echo "`date`"
  echo "`tail $DIRECTORY`"
  sleep 1
done
